using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using CMS.Core.DataInterfaces;
using CMS.Core.Domain;
using CMS.Data;
using AjaxPro;

namespace CMS.Presenters
{
    public class MainScreenPresenter
    {
        MainScreenView view;
        //IVBDenDao vbDenDao;
        //IVBDiDao vbDiDao;
        //IHoSoDao hsDao;


        //Attaches this presenter to the view's events.
        public MainScreenPresenter(MainScreenView view)
        {
            this.view = view;
            SubscribeViewToEvents();
        }

        public MainScreenPresenter()
        {

        }
        void SubscribeViewToEvents()
        {
            view.Load += OnViewLoad;
        }

        void OnViewLoad(object sender, EventArgs e)
        {
            if (!view.IsPostBack)
            {
                //LoadViewFromModel();
                //view.DataBind();
            }
        }

        public void LoadViewFromModel(String nsd, Boolean isVanThu)
        {
            //if (isVanThu)
            //{
            //    this.vbDenDao = NHibernateDaoFactory.Instance.GetVBDenDao();
            //    view.IDList = this.vbDenDao.GetNhacViecVanThu();
            //    this.vbDiDao = NHibernateDaoFactory.Instance.GetVBDiDao();
            //    view.ODList = this.vbDiDao.GetNhacViecVanThu();
            //}
            //this.hsDao = NHibernateDaoFactory.Instance.GetHoSoDao();
            //view.TaskList = this.hsDao.GetNhacViecChuyenVienLanhDaoVanThu(nsd);
        }

    }
}
